<%@ page contentType="text/html;charset=UTF-8" %>
<%@ page import="org.springside.modules.security.springsecurity.SpringSecurityUtils" %>
<%@ include file="/common/taglibs.jsp" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<title>Web 角色管理</title>
	<%@ include file="/common/meta.jsp" %>
	<link href="${ctx}/css/style.css" type="text/css" rel="stylesheet"/>
</head>

<body style="margin-top:20px;">

<div id="content">
	<div id="message"><s:actionmessage theme="mytheme"/></div>

	<div id="filter"><h1><img src="${ctx}/skin/images/frame/icon22.gif" align="absbottom"/>&nbsp;角色管理列表</h1></div>

	<div style="margin-top:10px;">
		<table width="95%" border="0" cellpadding="5" cellspacing="0" id="contentTable">
			<tr>
				<th bgcolor="#F5F5F5" background="${ctx}/skin/images/frame/wbg.gif">名称</th>
				<th bgcolor="#F5F5F5" background="${ctx}/skin/images/frame/wbg.gif">授权</th>
				<th bgcolor="#F5F5F5" background="${ctx}/skin/images/frame/wbg.gif">操作</th>
			</tr>

			<s:iterator value="allRoleList">
				<tr onmousemove="javascript:this.bgColor='#d6eff8';" onmouseout="javascript:this.bgColor='#FFFFFF';">
					<td align="center">${name}</td>
					<td align="center">${authNames}</td>
					<td align="center">&nbsp;
						<security:authorize ifAnyGranted="A_VIEW_ROLE">
							<security:authorize ifNotGranted="A_MODIFY_ROLE">
								<a href="role!input.action?id=${id}">查看</a>&nbsp;
							</security:authorize>
						</security:authorize>

						<security:authorize ifAnyGranted="A_MODIFY_ROLE">
							<a href="role!input.action?id=${id}">修改</a>&nbsp;
							<a href="role!delete.action?id=${id}">删除</a>
						</security:authorize>
				  </td>
				</tr>
			</s:iterator>
	  </table>
	</div>

	<div class="page">
		<security:authorize ifAnyGranted="A_MODIFY_ROLE">
			<a href="role!input.action">增加新角色</a>
		</security:authorize>
	</div>
</div>

</body>
</html>